﻿@model TracNghiem.Areas.Admin.Models.UserModel
<div class="container_12">       
    <div class="grid_12">            
        <div class="module">
                <h2 align="right"><span><a href="@Url.Action("Index", "User")">Quay lại</a></span></h2>                       
                <div class="module-body">
                @using (Html.BeginForm("AddUser", "User", FormMethod.Post, new { id = "AddUser" }))
                {                      
                    <div align="center"><h3>Thêm mới người dùng</h3>
                        @*<div class="account" align="center"> 
                            <img src="@Url.Content("~/Content/themes/template/image//Body_Images/Add_User.png")" width="12%" />
                        </div>*@
                    </div>
                    if (TempData["msg"] != null)
                    {                            
                        <span class="notification n-error">@TempData["msg"]</span>
                    }  
                    <p></p>
                    <table> 
                        <div style="width:50%; text-align:center; float:left">      
                            <p align="center">
                                <label style="width:30%; text-align:left">Tên đăng nhập:</label>
                                <div align="center" style="padding-left: 17%">
                                    @Html.TextBoxFor(model => model.username, new { @name = "username", @class = "input-medium" }) 
                                    <font color="red">(*)</font>
                                    <label style="width:56%; text-align:left;color:red">
                                        @Html.ValidationMessageFor(model => model.username)
                                    </label>
                                </div>                                                
                            </p>
                                        
                            <p align="center">
                                <label style="width:30%; text-align:left">Mật khẩu:</label>
                                <div align="center" style="padding-left: 17%">
                                    @Html.TextBoxFor(model => model.password, new { @name = "password", @class = "input-medium" })
                                    <font color="red">(*)</font>
                                    <label style="width:56%; text-align:left;color:red">
                                        @Html.ValidationMessageFor(model => model.password)
                                    </label>
                                </div>
                            </p>    
                            <p align="center">
                                <label style="width:30%; text-align:left">Trung tâm:</label> 
                                <div align="center" style="padding-left: 5%"> 
                                    @if (Model.trungtam_id != null)
                                    { 
                                        @Html.DropDownListFor(x => x.donvi_id, Model.trungtam_id)                     
                                    }
                                </div>                          
                            </p>
                        </div>
                        <div style="width:50%; text-align:center; float:right">
                            <div align="center">
                                    <label style="width:75%; text-align:left;">Trạng thái:</label>
                                    <p align="center" style="width:75%; text-align:left;">
                                        <select name="trang_thai">
                                            <option value="1" selected="selected">Bình thường</option>
                                            <option value="0" >Khóa</option>                            
                                        </select>                                        
                                    </p>    
                            </div>
                            <div align="center">
                                <label style="width:75%; text-align:left">Họ tên:</label>
                                <p align="center" style="width:75%; text-align:left;">
                                    @Html.TextBoxFor(model => model.hoten, new { @name = "hoten", @class = "input-medium" })
                                    <font color="red">(*)</font>
                                    <label style="width:60%; text-align:left;color:red">
                                        @Html.ValidationMessageFor(model => model.hoten)
                                    </label>
                                </p>
                            </div>
                            <div align="center">
                                <label style="width:75%; text-align:left">Số điện thoại:</label>
                                <p align="center" style="width:75%; text-align:left;">
                                    @Html.TextBoxFor(model => model.so_dien_thoai, new { @name = "so_dien_thoai", @class = "input-medium" })
                                </p>
                            </div>
                            <div align="center">
                                <label style="width:75%; text-align:left">Email:</label>
                                <p align="center" style="width:75%; text-align:left;">
                                    @Html.TextBoxFor(model => model.mail, new { @name = "mail", @class = "input-medium" })
                                </p>
                            </div>
                        </div>
                    </table>
                    <div class="button" align="center">
                        <p style="width:26%; text-align:center">
                            <input class="submit-green" type="submit" value="Thêm"/> 
                            <input class="submit-gray" type="reset" value="Hủy" />
                            
                        </p>
                    </div>
                }
                </div> <!-- End .module-body -->
        </div>  <!-- End .module -->
        <div style="clear:both;"></div>
    </div> <!-- End .grid_12 --> 
    <div style="clear:both;"></div>
</div> <!-- End .container_12 -->
